package cn.dark.auth.core;

/**
 * @author dark
 * @date 2023-10-26
 */
public class KeyGenerateUtil {


    private KeyGenerateUtil() {}

    private static String LOGIN_ID_KEY_PREFIX = "auth-demo.login-id.";
    public static String getKeyByLoginId(Object loginId) {
        return LOGIN_ID_KEY_PREFIX + loginId;
    }

    private static String SESSION_KEY_PREFIX = "auth-demo.session.";
    public static String getSessionKeyByLoginId(Object loginId) {
        return SESSION_KEY_PREFIX + loginId;
    }

    private static String TOKEN_VALUE_KEY_PREFIX = "auth-demo.token-value.";
    public static String getKeyByToken(String token) {
        return TOKEN_VALUE_KEY_PREFIX + token;
    }

}
